fix: ignore create and update outputs for Rule - #63
michaelhtm wants to merge 1 commit into
Conversation
|
/hold |
|
@michaelhtm: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
38f601e to
f3d5bcd
Compare
|
/label release/patch |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, michaelhtm, sapphirew The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Currently, when AWS returns the output of CreateRule or UpdateRule, it returns a list of Actions, which hold TargetGroupArns. TargetGroups can also be referenced from a k8s TargetGroup object. When AWS returns the list of Actions, the generated code creates a new Action struct and populates it with the values from the sdk output (which do not include the references). If the user sets a targetGroupRef, we do not have a way to figure out the correct Action to assign the returned targetGroupRef. This change ignores setting Actions returned by CreateRule and UpdateRule so references are preserved on the write path. The ReadOne path still reads Actions back for drift detection, so Actions is now compared with a custom comparator (compare.is_ignored) that strips the k8s-only targetGroupRef and normalizes the server-assigned Order while still comparing the resolved targetGroupARN. This avoids a redundant ModifyRule on every reconcile that would otherwise be triggered by the ref being absent from the observed state.
f3d5bcd to
8e34f32
Compare
|
New changes are detected. LGTM label has been removed. |
|
/unhold |
Issue #2652
Description of changes:
Currently, when AWS returns the output of CreateRule or UpdateRule,
it returns a list of Actions, which hold TargetGroupArns.
TargetGroups can also be referenced from a k8s TargetGroup object.
When AWS returns the list of Actions, the generated code creates a new
Action struct and populates it with the values from the sdk output
(which do not include the references).
If the user sets a targetGroupRef, we do not have a way to figure out
the correct Action to assign the returned targetGroupRef.
This change ignores setting Actions returned by CreateRule and
UpdateRule so references are preserved on the write path. The ReadOne
path still reads Actions back for drift detection, so Actions is now
compared with a custom comparator (compare.is_ignored) that strips the
k8s-only targetGroupRef and normalizes the server-assigned Order while
still comparing the resolved targetGroupARN. This avoids a redundant
ModifyRule on every reconcile that would otherwise be triggered by the
ref being absent from the observed state.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.